<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>librf: resumef::local_scheduler_t结构体 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">librf
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>resumef</b></li><li class="navelem"><a class="el" href="structresumef_1_1local__scheduler__t.html">local_scheduler_t</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="structresumef_1_1local__scheduler__t-members.html">所有成员列表</a>  </div>
  <div class="headertitle">
<div class="title">resumef::local_scheduler_t结构体 参考</div>  </div>
</div><!--header-->
<div class="contents">

<p>创建一个线程相关的调度器。  
 <a href="structresumef_1_1local__scheduler__t.html#details">更多...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a05f60c654c1f7390682cab7cdcddb112"><td class="memItemLeft" align="right" valign="top"><a id="a05f60c654c1f7390682cab7cdcddb112"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structresumef_1_1local__scheduler__t.html#a05f60c654c1f7390682cab7cdcddb112">local_scheduler_t</a> ()</td></tr>
<tr class="memdesc:a05f60c654c1f7390682cab7cdcddb112"><td class="mdescLeft">&#160;</td><td class="mdescRight">尽可能的创建一个线程相关的调度器。 <br /></td></tr>
<tr class="separator:a05f60c654c1f7390682cab7cdcddb112"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0443e2872feef9f1893087826e7fa7e2"><td class="memItemLeft" align="right" valign="top"><a id="a0443e2872feef9f1893087826e7fa7e2"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structresumef_1_1local__scheduler__t.html#a0443e2872feef9f1893087826e7fa7e2">local_scheduler_t</a> (<a class="el" href="structresumef_1_1scheduler__t.html">scheduler_t</a> &amp;sch)</td></tr>
<tr class="memdesc:a0443e2872feef9f1893087826e7fa7e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">将指定的调度器绑定到当前线程上。 <br /></td></tr>
<tr class="separator:a0443e2872feef9f1893087826e7fa7e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af4c4cd1c6626930ccf891368e3f3e6ec"><td class="memItemLeft" align="right" valign="top"><a id="af4c4cd1c6626930ccf891368e3f3e6ec"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structresumef_1_1local__scheduler__t.html#af4c4cd1c6626930ccf891368e3f3e6ec">~local_scheduler_t</a> ()</td></tr>
<tr class="memdesc:af4c4cd1c6626930ccf891368e3f3e6ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">如果当前线程绑定的调度器由local_scheduler_t所创建，则会销毁调度器，并解绑线程。 <br /></td></tr>
<tr class="separator:af4c4cd1c6626930ccf891368e3f3e6ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>创建一个线程相关的调度器。 </p>
<p>如果线程之前已经创建了调度器，则第一个调度器会跟线程绑定，此后local_scheduler_t不会创建更多的调度器。<br  />
否则，local_scheduler_t会创建一个调度器，并绑定到创建local_scheduler_t的线程上。<br  />
如果local_scheduler_t成功创建了一个调度器，则在local_scheduler_t生命周期结束后，会销毁创建的调度器，并解绑线程。<br  />
典型用法，是在非主线程里，开始运行协程之前，申明一个local_scheduler_t的局部变量。 </p>
</div><hr/>该结构体的文档由以下文件生成:<ul>
<li>librf/src/<a class="el" href="scheduler_8h_source.html">scheduler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
